﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WPFEdit.Document
{
	/// <summary>
	/// Acts as a docuemnt host for the application. Implemnting class must 
	/// have the DocumentEditor attribute.
	/// </summary>
    public interface IDocumentEditor
    {
		/// <summary>
		/// The hosted document.
		/// </summary>
        Document Document { get; set; }
		/// <summary>
		/// The control to display in the tab view.
		/// </summary>
        object ContentControl { get; }
		/// <summary>
		/// Called when the document is selected in the tab view
		/// </summary>
        void OnSelected();
        /// <summary>
        /// Called when the document is saving. Returns true if saving can continue, false if
        /// saving must be cancelled. This should also perform any ncessary operations on the
        /// data prior to it being saved.
        /// </summary>
        /// <returns></returns>
        bool OnSaving();
    }
}
